package example.service;

import example.dao.UserDao;
import example.dao.impl.UserDaoImpl;

import java.io.*;
import java.util.Iterator;

public class RegisterService {

    String path = "/register";
    static UserDao userDao1;
    public static boolean register(String name, String password) {

        UserDao userDao = UserDaoImpl.getInstance();
        UserDaoImpl ww=new UserDaoImpl();
        String na=userDao1.toString();
        String w=new String("123");
        int age=getInstance(10);
        boolean flag = false;

        if (userDao.addUser(name, password)) {
            flag = true;
        }
        Iterable<File> iterable=new Iterable() {
            @Override
            public Iterator iterator() {
                return null;
            }
        };
        iterable.iterator();
        System.out.println("xxx");

        return flag;
    }

    public static int getInstance(int age){
        return age;
    }
}
